#pragma once
#include "afxwin.h"
#include <XHyperLink.h>
#include <XColorStatic.h>
#include <xSkinButton.h>
#include <SimpleHtmlStatic.h>

#ifdef _WIN32_WCE
#error "CDHtmlDialog is not supported for Windows CE."
#endif 

// CDlgPopOffInfo dialog

class CDlgPopOffInfo : public CDialog
{
	DECLARE_DYNCREATE(CDlgPopOffInfo)

public:
	CDlgPopOffInfo(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgPopOffInfo();

// Dialog Data
	enum { IDD = IDD_DLGPOPOFFINFO};	

	void SetOffPriceInfo(tagOffPriceInfo& stPriceInfo);

	void UpdateAccount();

	BOOL m_bLogin;
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();

	typedef BOOL (WINAPI *FnSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD); 

	HINSTANCE m_hInstUser32;
	FnSetLayeredWindowAttributes m_fnSetLayeredWindowAttributes;

	DECLARE_MESSAGE_MAP()
public:
	afx_msg LRESULT OnNcHitTest(CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	afx_msg void OnSize(UINT nType, int cx, int cy);
protected:
	virtual void OnOK();
	virtual void OnCancel();
public:


	afx_msg BOOL OnEraseBkgnd(CDC* pDC);

	int ShowReturnItem(void);

	CXHyperLink m_wndAccountInfo;	
	CSimpleHtmlStatic m_wndOffPrecentInfo;
	CxSkinButton m_wndConvertUrl;
	CSimpleHtmlStatic m_wndPriceInfo;	
	CXHyperLink m_wndOnlineHelp;
	CXHyperLink m_wndUserCenter;
	CXHyperLink m_wndQQKefu;

	CString m_strAleadyLogin;
	CString m_strConvertIUrl;
	CString m_strSetAccountTip;
	CString m_strNoAccountFanli;

	CBitmap		m_bmpNotLoginBG;
	CBitmap		m_bmpLoginBG;
	afx_msg void OnBnClickedBtnConvert();
	afx_msg LRESULT OnXHyperLinkClicked(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnMouseLeave(WPARAM wParam, LPARAM lParam);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	CSimpleHtmlStatic m_wndStaticAccTitle;
	afx_msg void OnStnClickedStaticAccTitle();
};
